<?php

namespace common\models;


use yii\db\ActiveRecord;

class OrderItem extends ActiveRecord
{
    public static function tableName()
    {
        return 'order_item';
    }

    public function rules()
    {
        return [
            [['id','order_id','goods_num','goods_id','goods_attr_id','is_delete','car_id',
                'create_time','update_time'],'integer'],
            [['goods_price','order_money'],'double']
        ];
    }

    public function attributeLabels(){
        return [
            'id' => 'id',
            'order_id' => '订单id',
            'goods_num' => '商品数量',
            'goods_price' => '价格',
            'order_money' => '总价',
            'goods_id' => '商品id',
            'goods_attr_id' => '商品属性id',
            'is_delete' => '是否删除',
            'car_id' => '购物车id',
            'create_time' => '创建时间',
            'update_time' => '修改时间'
        ];
    }
}